<template>
	<view class="content"> 
		<view class="balance">
			<view class="title">待提現金額</view>
			<view class="num">
				<view class="price">
					<view>{{myInfor.money}}</view>
					<text>園</text>	
				</view>
				<view class="btn">去提現</view>
			</view>
			<view class="add-up">
				<view>累計現金收益：0園</view>
				<view class="more">
					<view>提現記錄</view>
					<image src="../../../static/image/mine/open.png" mode=""></image>
				</view>
			</view>
		</view>
		<view class="award-list">
			<view class="state-nav">
				<view class="one-state" @click="chooseThis(0)" :class="{'active':chooseIndex==0}">已邀請</view>
				<view class="one-state" @click="chooseThis(1)" :class="{'active':chooseIndex==1}">一梯隊獎勵</view>
				<view class="one-state" @click="chooseThis(2)" :class="{'active':chooseIndex==2}">二梯隊獎勵</view>
				<view class="state-bar" :style="{left:barLeft+'rpx'}"></view>
			</view>
			<scroll-view class="all-list" scroll-y="true" >
				<view class="one-list">
					<view>邀請</view>
					<view class="tel">191****5551</view>
					<view class="status">邀請成功</view>
				</view>
				<view class="one-list">
					<view>邀請</view>
					<view class="tel">191****5551</view>
					<view class="status">邀請成功</view>
				</view>
				<view class="one-list">
					<view>邀請</view>
					<view class="tel">191****5551</view>
					<view class="status">邀請成功</view>
				</view>
				<view class="one-list">
					<view>邀請</view>
					<view class="tel">191****5551</view>
					<view class="status">邀請成功</view>
				</view>
				<view class="one-list">
					<view>邀請</view>
					<view class="tel">191****5551</view>
					<view class="status">邀請成功</view>
				</view>
				<view class="one-list">
					<view>邀請</view>
					<view class="tel">191****5551</view>
					<view class="status">邀請成功</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				barLeft:22,
				chooseIndex:0
			};
		},
		computed:{
			myInfor(){
				return this.$store.getters.myInfor
			}
		},
		methods:{
			chooseThis(e){
				this.chooseIndex=e;
				if(this.chooseIndex>0){
					this.barLeft=180*this.chooseIndex;
				}else{
					this.barLeft=22;
				}
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color:#FAFAFA;
		padding-top:24rpx;
		width:702rpx;margin-left:auto;
		margin-right:auto;
		.balance{
			width:100%;background-color: #ffffff;
			border-radius: 15rpx;
			padding-top:24rpx;overflow: hidden;
			box-shadow: 0 2rpx 12rpx 0 rgba(204,204,204,0.3);
			.title{
				padding-left:24rpx;font-size: 26rpx;
				line-height: 37rpx;
			}
			.num{
				padding:24rpx;display: flex;align-items: flex-end;
				justify-content: space-between;
				.price{
					display: flex;align-items: flex-end;
					color: #040404;
					font-size: 60rpx;
					line-height: 84rpx;
					text{
						font-size:30rpx;margin-bottom:-10rpx;
					}
				}
				.btn{
					width:126rpx;height:51rpx;
					background-color: #D71B0A;
					display: flex;align-items: center;
					justify-content: center;border-radius: 51rpx;
					color:#ffffff;font-size:26rpx;
				}
			}
			.add-up{
				background-color:rgba(215, 215,215, .15);padding:24rpx;
				display: flex;align-items: center;
				justify-content: space-between;
				font-size:24rpx;color:33rpx;
				.more{
					display: flex;align-items: center;
					image{
						width:10rpx;height:15rpx;
						margin-left:10rpx;
					}
				}
			}
		}
		.award-list{
			width:100%;background-color: #ffffff;
			border-radius: 15rpx;margin-top:22rpx;
			padding:24rpx;overflow: hidden;box-sizing: border-box;
			box-shadow: 0 2rpx 12rpx 0 rgba(204,204,204,0.3);
			.state-nav{
				position: relative;
				display: flex;align-items: center;
				padding-bottom:10rpx;
				.one-state{
					display: flex;align-items: center;margin-right:50rpx;
					justify-content: center;font-size:26rpx;color:#9E9E9E;
					line-height:37rpx;transition: all 0.3s;
				}
				.active{
					font-size:30rpx;color:#040404;
				}
				.state-bar{
					position:absolute;bottom:0;width:35rpx;height:5rpx;border-radius: 5rpx;
					background-color: #D71B0A;transition: all 0.3s;
				}
			}
			.all-list{
				width:100%;height:700rpx;
				.one-list{
					display: flex;align-items: center;justify-content:space-between;
					width:100%;height:100rpx;display: flex;align-items: center;
					justify-content: space-between;background-color: #F5F5F5;
					padding:0 24rpx;box-sizing: border-box;margin-top:24rpx;
					border-radius: 15rpx;font-size:26rpx;color:#040404;
					.status{
						color:#D71B0A;
					}
				}
			}
		}
	}
</style>
